#define  _CRT_SECURE_NO_WARNINGS 1

#include "List.h"

void test()
{
	LTnode* head = CreateHead();

	LTPushBack(head, 1);
	LTPushBack(head, 2);
	LTPushBack(head, 3);
	LTPushBack(head, 4);
	LTPrint(head);

	LTPopBack(head);
	LTPopBack(head);
	LTPopBack(head);
	LTPrint(head);
	LTPopBack(head);
	LTPopBack(head);
	LTPrint(head);

	LTDestroy(head);
	head = NULL;
}

void test1()
{
	LTnode* head = CreateHead();

	LTPushFront(head, 1);
	LTPushFront(head, 2);
	LTPushFront(head, 3);
	LTPushFront(head, 4);
	LTPrint(head);

	LTPopFront(head);
	LTPopFront(head);
	LTPopFront(head);
	LTPrint(head);
	LTPopFront(head);
	LTPopFront(head);
	LTPrint(head);

	LTDestroy(head);
	head = NULL;
}

void test2()
{
	LTnode* head = CreateHead();

	LTPushBack(head, 1);
	LTPushBack(head, 2);
	LTPushBack(head, 3);
	LTPushBack(head, 4);
	LTPrint(head);
	
	LTnode* pos = LTFind(head, 4);
	LTInsert(pos, 40);
	LTPrint(head);
	LTErase(pos);
	LTPrint(head);

	LTDestroy(head);
	head = NULL;
}
int main()
{
	test2();

	return 0;
}


